import request from '@/utils/request'
type MessagelistparamsType = {
  sendUserName: null// 可选
  pageIndex: number
  pageSize: number
}

type MessagelistResponseType = {
  id: number
 title: string,
 content: string,
 sendUserName: string,
receives: string,
receiveUserCount:number,
readCount:number,
createTime: string
}
type  MessagelistPageResponse = {
  total: number
  list:  MessagelistResponseType[]
}
interface ApiResponse<T> {
  code: number
  message: string
  response: T
}
export function MessagelistPageResponse(data: MessagelistparamsType) {
  return request.post<ApiResponse<MessagelistPageResponse>>('/api/admin/message/page', data)
}
